<template>
    <vxe_table :options="options" @handleTableBtn="handleTableBtn">
      <template #btn>
        <el-button type="success" @click="handleADD">发布商品</el-button>
      </template>
    </vxe_table>
  </template>
  
  <script>
  import vxe_table from "@/components/table/vxe_table.vue";
  import tableMixin from "@/mixins";
  export default {
    mixins:[tableMixin],
    components: {
      vxe_table,
    },
    data() {
      return {
        options: {
          id: "mytable",
          columns: [
              { field: "shop_name", title: "商家名称" ,width:100,search:true,valueType:'input'},
              { field: "contact_person", title: "商家联系人" ,width:100,search:true,valueType:'input'},
              { field: "order_number", title: "订单号" ,width:100,search:true,valueType:'input'},
              { field: "phone_number", title: "手机号" ,width:100,search:true,valueType:'input'},
              { field: "address", title: "地址" ,width:100},
              { field: "status", title: "状态" ,width:100},
              { field: "issuer", title: "开单人" ,width:100,search:true,valueType:'input'},
              { field: "issue_date", title: "开单日期" ,width:100},
              { field: "customer_name", title: "客户名称" ,width:100,search:true,valueType:'input'},
              { field: "logistics_name", title: "物流名称" ,width:100,search:true,valueType:'input'},
              { field: "logistics_number", title: "物流单号" ,width:100},
              { field: "delivery_date", title: "交货日期" ,width:100},
              { field: "urgent", title: "加急" ,width:100},
              { field: "rent_start_time", title: "起租时间" ,width:100},
              { field: "rent_end_time", title: "租止时间" ,width:100},
              { field: "total_quantity", title: "总数量" ,width:100},
              { field: "include_tax", title: "含税" ,width:100},
              { field: "amount_excluding_tax", title: "不含税金额" ,width:100},
              { field: "amount_including_tax", title: "含税金额" ,width:100},
              { field: "tax_amount", title: "税金" ,width:100},
              { field: "invoiced", title: "是否开票" ,width:100},
              { field: "invoice_number", title: "发票号" ,width:100},
              { field: "payment_status", title: "收款状态" ,width:100},
              { field: "return_status", title: "归还状态" ,width:100},
              { field: "shipping_status", title: "发货状态" ,width:100},
              { field: "notes", title: "备注" ,width:100},
              { field: "confirm_time", title: "确认时间" ,width:100},
              { field: "confirmer", title: "确认人" ,width:100},
              { field: "shipping_time", title: "发货时间" ,width:100},
              { field: "shipper", title: "发货人" ,width:100},
              { field: "sign_time", title: "签收时间" ,width:100},
              { field: "signee", title: "签收人" ,width:100},
              { field: "return_time", title: "归还时间" ,width:100},
              { field: "returner", title: "归还人" ,width:100},
          ],
          btn:[
          {
              title:'编辑',
              handleName:'edit'
            },
            {
              title:'上架',
              handleName:'edit',
              type:'success'
            },
            {
              title:'下架',
              handleName:'edit',
              type:'success'
            },
          ]
        },
      };
    },
    methods:{
      edit(row,index){
        console.log(row,index)
      },
      handleADD(){
        this.$router.push('/addProduct/addProduct')
      }
    }
  };
  </script>
  